package com.ce.source.analysis.design.observe;

import java.util.Observable;
import java.util.Observer;

/**
 * @author ：前世小和尚（xiaopingzhang8@creditease.cn）
 * @Description ：
 * @ClassName ：Login
 * @Company ：普信恒业科技发展（北京）有限公司
 * @date ：2018/1/31 17:27
 */
public class Login implements Observer {
    /**
     * This method is called whenever the observed object is changed. An
     * application calls an <tt>Observable</tt> object's
     * <code>notifyObservers</code> method to have all the object's
     * observers notified of the change.
     *
     * @param o   the observable object.
     * @param arg an argument passed to the <code>notifyObservers</code>
     */
    public void update(Observable o, Object arg) {
        Client c = (Client) o;
        System.out.println("这是登录Login,userName->"+c.getUserName()+" , age->{}"+c.getAge());
    }
}
